﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AdvertismentManager.ascx.cs" Inherits="Web.Cms.Advertistment.AdvertismentManager" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>
<%@ Register Assembly="FilePickerControl" Namespace="AWS.FilePicker" TagPrefix="cc1" %>
<table border="0" cellpadding="2" cellspacing="2" style="width: 100%">
    <tr>
        <td>
        </td>
        <td>
            <asp:Label ID="lblUpdateStatus" runat="server" ForeColor="red"></asp:Label></td>
    </tr>
    <tr>
        <td colspan="2">
            <div style="padding-right: 20px;" runat="server" id="divInsertItem">
                <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/cms/Advertistment/addEditBanner.aspx','Quản lý banner',720,400,null,null)">
                    <img src="../App_Themes/Default/Images/Add_b.gif" border="0" />
                </a>                
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top" colspan="2">
            <table border="0" cellpadding="2" cellspacing="2" style="width: 100%">
                <tr>
                    <td>
                        <asp:GridView ID="grdMedias" runat="server" AutoGenerateColumns="False" BorderColor="Gainsboro"
                            BorderStyle="solid" BorderWidth="1px" CaptionAlign="Top" CellPadding="2" SkinID="AdminGrid"
                            OnRowCommand="grdMedias_RowCommand" OnRowDataBound="grdMedias_RowDataBound" Width="100%"
                            OnPageIndexChanging="grdMedias_PageIndexChanging" PageSize="500">
                            <AlternatingRowStyle CssClass="Grid_Raw2" />
                            <RowStyle CssClass="Grid_Raw1" />
                            <HeaderStyle CssClass="Grid_Top" Font-Bold="True" />
                            <Columns>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        STT
                                    </HeaderTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="5px" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblSTT" runat="server"></asp:Label>
                                        <asp:Label Visible="false" ID="lbAdvId" runat="server" Text='<%# Eval("AdvertisementID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Title" HeaderText="T&#234;n banner">                                  
                                </asp:BoundField>                               
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Ảnh
                                    </HeaderTemplate>
                                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Literal ID="litMedia" runat="server"></asp:Literal>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>Nhóm quảng cáo</HeaderTemplate>
                                    <ItemStyle Width="120px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:DropDownList ID="dropAdvertises" Width="120px" runat="server">
                                        </asp:DropDownList>                                        
                                    </ItemTemplate>
                                </asp:TemplateField>                               
                                <asp:TemplateField>
                                    <HeaderTemplate>Ngày bắt đầu</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblStartDate" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Right" Width="100px"  />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>Ngày kết thúc</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblEndDate" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle Width="100px" HorizontalAlign="Right" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Trạng thái</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblActionStatus" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle Width="60px" />
                                </asp:TemplateField>
                                <asp:TemplateField Visible="false">
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle Width="6px" HorizontalAlign="Center" />
                                    <HeaderTemplate>
                                        <asp:Button ID="btnSetIsEnable" CssClass="Button_using" runat="server" CommandName="SetIsEnable" />
                                        <br />
                                        <asp:CheckBox runat="server" ID="cboCheckIsEnable" />
                                        <asp:Label ID="lblIsEnable" runat="server"></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="cboIsEnable" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Thứ tự">
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                                    <HeaderTemplate>
                                        <asp:Button ID="btnSetOrder" runat="server" CommandName="setorder" SkinID="IconPriority" />
                                        <asp:Label ID="lblPriority" runat="server"></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:DropDownList ID="dropOrder" runat="server">
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        chỉnh sửa
                                    </HeaderTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="10px" />
                                    <ItemTemplate>
                                        <img alt="" src="../App_Themes/Default/images/edit.gif" style="cursor:pointer"
                            onclick="showPopWinADMIN('/cms/Advertistment/addEditBanner.aspx?ctrlkey=<%=CurrentCommand.CtrlKey %>&advId=<%# Eval("AdvertisementID") %>','<%# Eval("Title") %>',720,400,null,null);return false;" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>Xóa</HeaderTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="10px" />
                                    <ItemTemplate>
                                        <asp:Button ID="btnDeleteMedia" runat="server" CommandArgument='<%# Eval("AdvertisementID") %>'
                                            CommandName="deletemedia" SkinID="IconDelete" />
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
